﻿#ifndef MAPPER_USER_H
#define MAPPER_USER_H

#include <qobject.h>
#include "ObjAutoInject.h"

class DataBaseConnector;
class Mapper_User : public QObject,public ObjAutoInject
{

  Q_OBJECT
private://property
  const QString string_dataBaseName="user";
  const QString string_user_id="user_id";
  const QString string_user_name="user_name";
  const QString string_user_password="user_password";
private://dependency
  DataBaseConnector* dataBaseConnector=Q_NULLPTR;
public:
  explicit Mapper_User();
  virtual ~Mapper_User();
signals:
public:
  bool isVaildUser(QString userName, QString password, int* userId);
public://geter and seter
  DataBaseConnector* getDataBaseConnector();
  void setDataBaseConnector(DataBaseConnector* dataBaseConnector);
public:
  virtual void objectAutoInjection(QHash<QString, QObject *> *objMap) override;
};

#endif // MAPPER_USER_H
